Skip to content

Slash commands#13

Draft
ILike2WatchMemes wants to merge 12 commits intoSkyHanniStudios:masterfrom
ILike2WatchMemes:slash_commands
Draft

Slash commands#13
ILike2WatchMemes wants to merge 12 commits intoSkyHanniStudios:masterfrom
ILike2WatchMemes:slash_commands

Conversation

@ILike2WatchMemes
Copy link
Copy Markdown
Contributor

based on empas BaseCommand

Copy link
Copy Markdown
Member

@hannibal002 hannibal002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not happy with the design choices. Using any as object, calling all the utils classes that were previously extended functions from chat event via this, and the extraction of command objects so that the execute function only calls one more other function are verbose designs that don't fit in a modern Kotlin program

@ILike2WatchMemes
Copy link
Copy Markdown
Contributor Author

ILike2WatchMemes commented Mar 11, 2025

calling all the utils classes that were previously extended functions from chat event via this

I thought that this would be a cleaner/more efficient way than just making two functions with basically the same purpose, do you know a way in which it could be done better? Or would you rather there be two functions for the same purpose?

and the extraction of command objects so that the execute function only calls one more other function are verbose designs
that don't fit in a modern Kotlin program

"extraction of command objects"? wdym sorry

@hannibal002
Copy link
Copy Markdown
Member

I thought that this would be a cleaner/more efficient way than just making two functions with basically the same purpose, do you know a way in which it could be done better? Or would you rather there be two functions for the same purpose?

Two functions doing the same thing would also be bad
I am not sure if its the easiest way to implement, but basically write a wrapper for both events. create a new abstract object that both of those event wrappers implement, and then use that abstract object everywhere

extraction of command objects"?

i mean this here
image

@ILike2WatchMemes
Copy link
Copy Markdown
Contributor Author

aight I'm currently doing the first thing with a class, is there a difference between this and object?

@hannibal002
Copy link
Copy Markdown
Member

the idea is that the current logic doesnt change for command/feature classes. only in utils and the command init classes

Copy link
Copy Markdown
Member

@hannibal002 hannibal002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the merge conflicts

@hannibal002
Copy link
Copy Markdown
Member

@ILike2WatchMemes bump

@ILike2WatchMemes
Copy link
Copy Markdown
Contributor Author

grafik
🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants